<?php
/**
 * Created by PhpStorm.
 * User: kb130
 * Date: 2017/8/21
 * Time: 15:26
 */

namespace util\validate\rules;

/**
 * 验证值为数字类型
 * 不限整数或小数
 * Class Numeric
 * @package validate\rules
 */
class Numeric extends BaseRule
{

    public function verify()
    {
        if (0 === $this->value || 0 === strcmp($this->value, '0')) {
            return true;
        }

        return is_numeric($this->value);
    }
}